import { VxeFormItemProps, VxeGridPropTypes } from '@gui-pkg/antdcomponents';
const townData = [

  {value: '大金镇', label: '大金镇'},
  {value: '四望镇', label: '四望镇'},
  {value: '梅川镇', label: '梅川镇'},
  {value: '花桥镇', label: '花桥镇'},
  {value: '田家镇街道', label: '田家镇街道'},
  {value: '余川镇', label: '余川镇'},
  {value: '大法寺镇', label: '大法寺镇'},
  {value: '刊江街道', label: '刊江街道'},
]
export const columns: VxeGridPropTypes.Columns = [

  {
    title: '镇',
    field: 'town',
    align: 'center',
  },
  {
    title: '卡号',
    field: 'eqNo',
    align: 'center',
  },
  {
    title: '村',
    field: 'cun',
    align: 'center',
    fixed: 'left',
  },
  {
    title: '影响户数',
    field: 'family',
    align: 'center',
  },
  {
    title: '影响人数',
    field: 'peoples',
    align: 'center',
  },
  {
    title: '集中安置地点',
    field: 'address',
    align: 'center',
  },
  {
    title: '镇联系人1',
    field: 'townUser1',
    align: 'center',
  },
  {
    title: '镇联系人1电话',
    field: 'townUser1P',
    align: 'center',
  },
  {
    title: '镇联系人2',
    field: 'townUser2',
    align: 'center',
  },
  {
    title: '镇联系人2电话',
    field: 'townUser2P',
    align: 'center',
  },
  {
    title: '镇联系人3',
    field: 'townUser3',
    align: 'center',
  },
  {
    title: '镇联系人3电话',
    field: 'townUser3P',
    align: 'center',
  },

  {
    title: '村联系人',
    field: 'cunUser',
    align: 'center',
  },
  {
    title: '村联系人电话',
    field: 'cunUserP',
    align: 'center',
  },
  {
    title: '市级联系人',
    field: 'cityUser',
    align: 'center',
  },
  {
    title: '操作',
    align: 'center',
    slots: { default: 'action' },
  },
];

export const searchFormSchema: VxeFormItemProps[] = [
  {
    field: 'keywords',
    title: '快速搜索',
    itemRender: {
      name: 'AInput',
    },
    span: 4,
  },
  {
    field: 'town',
    title: '镇',
    itemRender: {
      name: 'ASelect',
      props: {
        options: townData,
      },
    },
    span: 4,
  },
  {
    field: 'eqNo',
    title: '卡号',
    itemRender: {
      name: 'AInput',
    },
    span: 4,
  },
  {
    span: 12,
    align: 'right',
    className: '!pr-0',
    itemRender: {
      name: 'AButtonGroup',
      children: [
        {
          props: { type: 'primary', content: '查询', htmlType: 'submit' },
          attrs: { class: 'mr-2' },
        },
        { props: { type: 'default', htmlType: 'reset', content: '重置' } },
      ],
    },
  },
];

export const formSchema = [

  {
    field: 'town',
    label: '镇',
    component: 'Select',
    componentProps: {
      options: townData
    },
  },
  {
    field: 'cun',
    label: '村',
    required: true,
    component: 'Input',
  },
  {
    field: 'family',
    label: '影响户数',
    required: true,
    component: 'Input',
  },
  {
    field: 'family',
    label: '影响人数',
    required: true,
    component: 'Input',
  },
  {
    field: 'address',
    label: '集中安置地点',
    required: true,
    component: 'Input',
  },

  {
    field: 'townUser1',
    label: '镇联系人1',
    component: 'Input',
  },
  {
    field: 'townUser1P',
    label: '镇联系人1电话',
    component: 'Input',
  },
  {
    field: 'townUser2',
    label: '镇联系人2',
    component: 'Input',
  },
  {
    field: 'townUser2P',
    label: '镇联系人2电话',
    component: 'Input',
  },
  {
    field: 'townUser3',
    label: '镇联系人3',
    component: 'Input',
  },
  {
    field: 'townUser3P',
    label: '镇联系人3电话',
    component: 'Input',
  },
  {
    field: 'cunUser',
    label: '村联系人',
    component: 'Input',
  },
  {
    field: 'cunUserP',
    label: '村联系人电话',
    component: 'Input',
  },
  {
    field: 'cityUser',
    label: '市级联系人',
    component: 'Input',
  },
  {
    field: 'eqNo',
    label: '卡号',
    component: 'Input',
  },

];
